<?php

namespace Model;
class User
{
    protected $pdo;

    public function __construct()
    {
        $this->pdo = new \PDO('mysql:host=127.0.0.1;dbname=db_php', 'root', '1234567890');
    }

    public function select()
    {
        $res = $this->pdo->query('select * from user');
        return $res->fetchAll(\PDO::FETCH_ASSOC);
    }
}